<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>NATS C Client with Streaming support: Options</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;" >
   <div id="projectname">NATS C Client with Streaming support
   &#160;<span id="projectnumber">2.1.0</span>
   </div>
   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__opts_group.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Options<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga61d4a0cf2fbf7d13cc910e5a00c575be"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be">natsOptions_Create</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> **newOpts)</td></tr>
<tr class="memdesc:ga61d4a0cf2fbf7d13cc910e5a00c575be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object.  <a href="#ga61d4a0cf2fbf7d13cc910e5a00c575be">More...</a><br /></td></tr>
<tr class="separator:ga61d4a0cf2fbf7d13cc910e5a00c575be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3f7e760214417c7d87541ecb9ab5bea5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5">natsOptions_SetURL</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *url)</td></tr>
<tr class="memdesc:ga3f7e760214417c7d87541ecb9ab5bea5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the URL to connect to.  <a href="#ga3f7e760214417c7d87541ecb9ab5bea5">More...</a><br /></td></tr>
<tr class="separator:ga3f7e760214417c7d87541ecb9ab5bea5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacb7e964ae54b74d972d72e118b7b8bdf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf">natsOptions_SetServers</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char **servers, int serversCount)</td></tr>
<tr class="memdesc:gacb7e964ae54b74d972d72e118b7b8bdf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the list of servers to try to (re)connect to.  <a href="#gacb7e964ae54b74d972d72e118b7b8bdf">More...</a><br /></td></tr>
<tr class="separator:gacb7e964ae54b74d972d72e118b7b8bdf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5b99da7dd74aac3be962f323c3863d9e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e">natsOptions_SetUserInfo</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *user, const char *password)</td></tr>
<tr class="memdesc:ga5b99da7dd74aac3be962f323c3863d9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the user name/password to use when not specified in the URL.  <a href="#ga5b99da7dd74aac3be962f323c3863d9e">More...</a><br /></td></tr>
<tr class="separator:ga5b99da7dd74aac3be962f323c3863d9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad58a5b9dabadeebda30e952ff7b39193"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193">natsOptions_SetToken</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *token)</td></tr>
<tr class="memdesc:gad58a5b9dabadeebda30e952ff7b39193"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the token to use when not specified in the URL.  <a href="#gad58a5b9dabadeebda30e952ff7b39193">More...</a><br /></td></tr>
<tr class="separator:gad58a5b9dabadeebda30e952ff7b39193"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga23a3b1f022112e98ddccb18b247b4426"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga23a3b1f022112e98ddccb18b247b4426">natsOptions_SetTokenHandler</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#ga7d93a74068ac6e5f4406d70b7c1f0094">natsTokenHandler</a> tokenCb, void *closure)</td></tr>
<tr class="memdesc:ga23a3b1f022112e98ddccb18b247b4426"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the tokenCb to use whenever a token is needed.  <a href="#ga23a3b1f022112e98ddccb18b247b4426">More...</a><br /></td></tr>
<tr class="separator:ga23a3b1f022112e98ddccb18b247b4426"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaabf8763b931dcf389c83fd95d760a413"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaabf8763b931dcf389c83fd95d760a413">natsOptions_SetNoRandomize</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool noRandomize)</td></tr>
<tr class="memdesc:gaabf8763b931dcf389c83fd95d760a413"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicate if the servers list should be randomized.  <a href="#gaabf8763b931dcf389c83fd95d760a413">More...</a><br /></td></tr>
<tr class="separator:gaabf8763b931dcf389c83fd95d760a413"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga17cd7fe41176cd98aca1184fa9352ad9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga17cd7fe41176cd98aca1184fa9352ad9">natsOptions_SetTimeout</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t timeout)</td></tr>
<tr class="memdesc:ga17cd7fe41176cd98aca1184fa9352ad9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the (re)connect process timeout.  <a href="#ga17cd7fe41176cd98aca1184fa9352ad9">More...</a><br /></td></tr>
<tr class="separator:ga17cd7fe41176cd98aca1184fa9352ad9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1c529d347be0fe2eec17c7f4698e283e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga1c529d347be0fe2eec17c7f4698e283e">natsOptions_SetName</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *name)</td></tr>
<tr class="memdesc:ga1c529d347be0fe2eec17c7f4698e283e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the name.  <a href="#ga1c529d347be0fe2eec17c7f4698e283e">More...</a><br /></td></tr>
<tr class="separator:ga1c529d347be0fe2eec17c7f4698e283e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa1f09416d443fa7a6af6b695da563eba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaa1f09416d443fa7a6af6b695da563eba">natsOptions_SetSecure</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool secure)</td></tr>
<tr class="memdesc:gaa1f09416d443fa7a6af6b695da563eba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the secure mode.  <a href="#gaa1f09416d443fa7a6af6b695da563eba">More...</a><br /></td></tr>
<tr class="separator:gaa1f09416d443fa7a6af6b695da563eba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2cd6563694a439b3949a31fd81103099"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099">natsOptions_LoadCATrustedCertificates</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *fileName)</td></tr>
<tr class="memdesc:ga2cd6563694a439b3949a31fd81103099"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads the trusted CA certificates from a file.  <a href="#ga2cd6563694a439b3949a31fd81103099">More...</a><br /></td></tr>
<tr class="separator:ga2cd6563694a439b3949a31fd81103099"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafb30794fc2ae74b9e0bd8fb609b901c8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gafb30794fc2ae74b9e0bd8fb609b901c8">natsOptions_SetCATrustedCertificates</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *certificates)</td></tr>
<tr class="memdesc:gafb30794fc2ae74b9e0bd8fb609b901c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the trusted CA certificates from memory.  <a href="#gafb30794fc2ae74b9e0bd8fb609b901c8">More...</a><br /></td></tr>
<tr class="separator:gafb30794fc2ae74b9e0bd8fb609b901c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga36943e2ba53d05407cdabc4e7e96484b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b">natsOptions_LoadCertificatesChain</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *certsFileName, const char *keyFileName)</td></tr>
<tr class="memdesc:ga36943e2ba53d05407cdabc4e7e96484b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads the certificate chain from a file, using the given key.  <a href="#ga36943e2ba53d05407cdabc4e7e96484b">More...</a><br /></td></tr>
<tr class="separator:ga36943e2ba53d05407cdabc4e7e96484b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae98f0f9034e93941767ab1ae6eec2c0c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gae98f0f9034e93941767ab1ae6eec2c0c">natsOptions_SetCertificatesChain</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *cert, const char *key)</td></tr>
<tr class="memdesc:gae98f0f9034e93941767ab1ae6eec2c0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the client certificate and key.  <a href="#gae98f0f9034e93941767ab1ae6eec2c0c">More...</a><br /></td></tr>
<tr class="separator:gae98f0f9034e93941767ab1ae6eec2c0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5698f020e8eb3e7440eb073fe08ef62c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga5698f020e8eb3e7440eb073fe08ef62c">natsOptions_SetCiphers</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *ciphers)</td></tr>
<tr class="memdesc:ga5698f020e8eb3e7440eb073fe08ef62c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the list of available ciphers.  <a href="#ga5698f020e8eb3e7440eb073fe08ef62c">More...</a><br /></td></tr>
<tr class="separator:ga5698f020e8eb3e7440eb073fe08ef62c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0ba43ba9930df385e4781b12be9f2851"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga0ba43ba9930df385e4781b12be9f2851">natsOptions_SetExpectedHostname</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *hostname)</td></tr>
<tr class="memdesc:ga0ba43ba9930df385e4781b12be9f2851"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the server certificate's expected hostname.  <a href="#ga0ba43ba9930df385e4781b12be9f2851">More...</a><br /></td></tr>
<tr class="separator:ga0ba43ba9930df385e4781b12be9f2851"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6f804ec44adc299989fe623570679da3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga6f804ec44adc299989fe623570679da3">natsOptions_SkipServerVerification</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool skip)</td></tr>
<tr class="memdesc:ga6f804ec44adc299989fe623570679da3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switch server certificate verification.  <a href="#ga6f804ec44adc299989fe623570679da3">More...</a><br /></td></tr>
<tr class="separator:ga6f804ec44adc299989fe623570679da3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa16bfd09ef318af18c27a0e199681b69"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaa16bfd09ef318af18c27a0e199681b69">natsOptions_SetVerbose</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool verbose)</td></tr>
<tr class="memdesc:gaa16bfd09ef318af18c27a0e199681b69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the verbose mode.  <a href="#gaa16bfd09ef318af18c27a0e199681b69">More...</a><br /></td></tr>
<tr class="separator:gaa16bfd09ef318af18c27a0e199681b69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga26f166af20de98bec67bc6cc916f769e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga26f166af20de98bec67bc6cc916f769e">natsOptions_SetPedantic</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool pedantic)</td></tr>
<tr class="memdesc:ga26f166af20de98bec67bc6cc916f769e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the pedantic mode.  <a href="#ga26f166af20de98bec67bc6cc916f769e">More...</a><br /></td></tr>
<tr class="separator:ga26f166af20de98bec67bc6cc916f769e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae68fb615835364c0809555e8dc93f57e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gae68fb615835364c0809555e8dc93f57e">natsOptions_SetPingInterval</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t interval)</td></tr>
<tr class="memdesc:gae68fb615835364c0809555e8dc93f57e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the ping interval.  <a href="#gae68fb615835364c0809555e8dc93f57e">More...</a><br /></td></tr>
<tr class="separator:gae68fb615835364c0809555e8dc93f57e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaff89c3f41627f4b2929dbc9b82d265b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaaff89c3f41627f4b2929dbc9b82d265b">natsOptions_SetMaxPingsOut</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int maxPingsOut)</td></tr>
<tr class="memdesc:gaaff89c3f41627f4b2929dbc9b82d265b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the limit of outstanding <code>PING</code>s without corresponding <code>PONG</code>s.  <a href="#gaaff89c3f41627f4b2929dbc9b82d265b">More...</a><br /></td></tr>
<tr class="separator:gaaff89c3f41627f4b2929dbc9b82d265b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1a3e3abfd7ddd8aff247df8f332bbda3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga1a3e3abfd7ddd8aff247df8f332bbda3">natsOptions_SetIOBufSize</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int ioBufSize)</td></tr>
<tr class="memdesc:ga1a3e3abfd7ddd8aff247df8f332bbda3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the size of the internal read/write buffers.  <a href="#ga1a3e3abfd7ddd8aff247df8f332bbda3">More...</a><br /></td></tr>
<tr class="separator:ga1a3e3abfd7ddd8aff247df8f332bbda3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b">natsOptions_SetAllowReconnect</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool allow)</td></tr>
<tr class="memdesc:ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates if the connection will be allowed to reconnect.  <a href="#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b">More...</a><br /></td></tr>
<tr class="separator:ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab54cd2719c0b64eebd6c7b83dd2908a0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0">natsOptions_SetMaxReconnect</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int maxReconnect)</td></tr>
<tr class="memdesc:gab54cd2719c0b64eebd6c7b83dd2908a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum number of reconnect attempts.  <a href="#gab54cd2719c0b64eebd6c7b83dd2908a0">More...</a><br /></td></tr>
<tr class="separator:gab54cd2719c0b64eebd6c7b83dd2908a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2730f4e16e318a2ef8de98dbf6ede807"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807">natsOptions_SetReconnectWait</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t reconnectWait)</td></tr>
<tr class="memdesc:ga2730f4e16e318a2ef8de98dbf6ede807"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the time between reconnect attempts.  <a href="#ga2730f4e16e318a2ef8de98dbf6ede807">More...</a><br /></td></tr>
<tr class="separator:ga2730f4e16e318a2ef8de98dbf6ede807"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa0d4b7ece8477cb9879f0dafff3456a5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaa0d4b7ece8477cb9879f0dafff3456a5">natsOptions_SetReconnectBufSize</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int reconnectBufSize)</td></tr>
<tr class="memdesc:gaa0d4b7ece8477cb9879f0dafff3456a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the size of the backing buffer used during reconnect.  <a href="#gaa0d4b7ece8477cb9879f0dafff3456a5">More...</a><br /></td></tr>
<tr class="separator:gaa0d4b7ece8477cb9879f0dafff3456a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga95510436eee06f9992ded96a44795c40"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga95510436eee06f9992ded96a44795c40">natsOptions_SetMaxPendingMsgs</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int maxPending)</td></tr>
<tr class="memdesc:ga95510436eee06f9992ded96a44795c40"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the maximum number of pending messages per subscription.  <a href="#ga95510436eee06f9992ded96a44795c40">More...</a><br /></td></tr>
<tr class="separator:ga95510436eee06f9992ded96a44795c40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga127ec7a8196b453947a7fa9a64096cbd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd">natsOptions_SetErrorHandler</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">natsErrHandler</a> errHandler, void *closure)</td></tr>
<tr class="memdesc:ga127ec7a8196b453947a7fa9a64096cbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the error handler for asynchronous events.  <a href="#ga127ec7a8196b453947a7fa9a64096cbd">More...</a><br /></td></tr>
<tr class="separator:ga127ec7a8196b453947a7fa9a64096cbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga44410242e73134e5bb51ef27904a9253"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253">natsOptions_SetClosedCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> closedCb, void *closure)</td></tr>
<tr class="memdesc:ga44410242e73134e5bb51ef27904a9253"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when a connection to a server is permanently lost.  <a href="#ga44410242e73134e5bb51ef27904a9253">More...</a><br /></td></tr>
<tr class="separator:ga44410242e73134e5bb51ef27904a9253"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadc8dc0cedd91bda71d544f3dedc4a039"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gadc8dc0cedd91bda71d544f3dedc4a039">natsOptions_SetDisconnectedCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> disconnectedCb, void *closure)</td></tr>
<tr class="memdesc:gadc8dc0cedd91bda71d544f3dedc4a039"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when the connection to a server is lost.  <a href="#gadc8dc0cedd91bda71d544f3dedc4a039">More...</a><br /></td></tr>
<tr class="separator:gadc8dc0cedd91bda71d544f3dedc4a039"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga26a48c8529fffa5f5d1a61c030979980"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga26a48c8529fffa5f5d1a61c030979980">natsOptions_SetReconnectedCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> reconnectedCb, void *closure)</td></tr>
<tr class="memdesc:ga26a48c8529fffa5f5d1a61c030979980"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when the connection has reconnected.  <a href="#ga26a48c8529fffa5f5d1a61c030979980">More...</a><br /></td></tr>
<tr class="separator:ga26a48c8529fffa5f5d1a61c030979980"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab5baab507c974402ab0d8c5e8227ee65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gab5baab507c974402ab0d8c5e8227ee65">natsOptions_SetDiscoveredServersCB</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> discoveredServersCb, void *closure)</td></tr>
<tr class="memdesc:gab5baab507c974402ab0d8c5e8227ee65"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback to be invoked when new servers are discovered.  <a href="#gab5baab507c974402ab0d8c5e8227ee65">More...</a><br /></td></tr>
<tr class="separator:gab5baab507c974402ab0d8c5e8227ee65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab09491bad908dedcb323c780280733ff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gab09491bad908dedcb323c780280733ff">natsOptions_SetEventLoop</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, void *loop, <a class="el" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">natsEvLoop_Attach</a> attachCb, <a class="el" href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">natsEvLoop_ReadAddRemove</a> readCb, <a class="el" href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">natsEvLoop_WriteAddRemove</a> writeCb, <a class="el" href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">natsEvLoop_Detach</a> detachCb)</td></tr>
<tr class="memdesc:gab09491bad908dedcb323c780280733ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the external event loop and associated callbacks.  <a href="#gab09491bad908dedcb323c780280733ff">More...</a><br /></td></tr>
<tr class="separator:gab09491bad908dedcb323c780280733ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabf060c92648b50c069f0abe7cbb06f1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gabf060c92648b50c069f0abe7cbb06f1c">natsOptions_UseGlobalMessageDelivery</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool global)</td></tr>
<tr class="memdesc:gabf060c92648b50c069f0abe7cbb06f1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switch on/off the use of a central message delivery thread pool.  <a href="#gabf060c92648b50c069f0abe7cbb06f1c">More...</a><br /></td></tr>
<tr class="separator:gabf060c92648b50c069f0abe7cbb06f1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7ca713c7532eff4d41a492e95b8822cf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga7ca713c7532eff4d41a492e95b8822cf">natsOptions_IPResolutionOrder</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int order)</td></tr>
<tr class="memdesc:ga7ca713c7532eff4d41a492e95b8822cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dictates the order in which host name are resolved during connect.  <a href="#ga7ca713c7532eff4d41a492e95b8822cf">More...</a><br /></td></tr>
<tr class="separator:ga7ca713c7532eff4d41a492e95b8822cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8f06568cc3319a5a0eef9f80282034ca"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga8f06568cc3319a5a0eef9f80282034ca">natsOptions_SetSendAsap</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool sendAsap)</td></tr>
<tr class="memdesc:ga8f06568cc3319a5a0eef9f80282034ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets if Publish calls should send data right away.  <a href="#ga8f06568cc3319a5a0eef9f80282034ca">More...</a><br /></td></tr>
<tr class="separator:ga8f06568cc3319a5a0eef9f80282034ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga70aa85319933d78c0076cc862fa3e5a6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga70aa85319933d78c0076cc862fa3e5a6">natsOptions_UseOldRequestStyle</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool useOldStyle)</td></tr>
<tr class="memdesc:ga70aa85319933d78c0076cc862fa3e5a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Switches the use of old style requests.  <a href="#ga70aa85319933d78c0076cc862fa3e5a6">More...</a><br /></td></tr>
<tr class="separator:ga70aa85319933d78c0076cc862fa3e5a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4f694b87039cedaa65cd25656b14d1a3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga4f694b87039cedaa65cd25656b14d1a3">natsOptions_SetNoEcho</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool noEcho)</td></tr>
<tr class="memdesc:ga4f694b87039cedaa65cd25656b14d1a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets if connection receives its own messages.  <a href="#ga4f694b87039cedaa65cd25656b14d1a3">More...</a><br /></td></tr>
<tr class="separator:ga4f694b87039cedaa65cd25656b14d1a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga20946800d024b7089e73d63454d1c19f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga20946800d024b7089e73d63454d1c19f">natsOptions_SetRetryOnFailedConnect</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, bool retry, <a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a> connectedCb, void *closure)</td></tr>
<tr class="memdesc:ga20946800d024b7089e73d63454d1c19f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates if initial connect failure should be retried or not.  <a href="#ga20946800d024b7089e73d63454d1c19f">More...</a><br /></td></tr>
<tr class="separator:ga20946800d024b7089e73d63454d1c19f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga60117450fc1f7b6f81bab455aeed7515"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515">natsOptions_SetUserCredentialsCallbacks</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, <a class="el" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">natsUserJWTHandler</a> ujwtCB, void *ujwtClosure, <a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a> sigCB, void *sigClosure)</td></tr>
<tr class="memdesc:ga60117450fc1f7b6f81bab455aeed7515"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callbacks to fetch user JWT and sign server's nonce.  <a href="#ga60117450fc1f7b6f81bab455aeed7515">More...</a><br /></td></tr>
<tr class="separator:ga60117450fc1f7b6f81bab455aeed7515"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga59b47f7b7a19085cf8eaada9bfe5606e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e">natsOptions_SetUserCredentialsFromFiles</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *userOrChainedFile, const char *seedFile)</td></tr>
<tr class="memdesc:ga59b47f7b7a19085cf8eaada9bfe5606e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the file(s) to use to fetch user JWT and see required to sign nonce.  <a href="#ga59b47f7b7a19085cf8eaada9bfe5606e">More...</a><br /></td></tr>
<tr class="separator:ga59b47f7b7a19085cf8eaada9bfe5606e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0290eac4665569c850468d9f00e246a0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0">natsOptions_SetNKey</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, const char *pubKey, <a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a> sigCB, void *sigClosure)</td></tr>
<tr class="memdesc:ga0290eac4665569c850468d9f00e246a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the NKey public key and signature callback.  <a href="#ga0290eac4665569c850468d9f00e246a0">More...</a><br /></td></tr>
<tr class="separator:ga0290eac4665569c850468d9f00e246a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaafda5fb8d9ee3a17bd475ceaecfac218"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#gaafda5fb8d9ee3a17bd475ceaecfac218">natsOptions_SetWriteDeadline</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts, int64_t deadline)</td></tr>
<tr class="memdesc:gaafda5fb8d9ee3a17bd475ceaecfac218"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the write deadline.  <a href="#gaafda5fb8d9ee3a17bd475ceaecfac218">More...</a><br /></td></tr>
<tr class="separator:gaafda5fb8d9ee3a17bd475ceaecfac218"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga93d8068cd6fff53b7f8e1c403db45eb9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9">natsOptions_Destroy</a> (<a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *opts)</td></tr>
<tr class="memdesc:ga93d8068cd6fff53b7f8e1c403db45eb9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object.  <a href="#ga93d8068cd6fff53b7f8e1c403db45eb9">More...</a><br /></td></tr>
<tr class="separator:ga93d8068cd6fff53b7f8e1c403db45eb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>NATS Options. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga61d4a0cf2fbf7d13cc910e5a00c575be"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_Create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> **&#160;</td>
          <td class="paramname"><em>newOpts</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Creates a <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. This object is used when one wants to set specific options prior to connecting to the <code>NATS Server</code>.</p>
<p>After making the appropriate natsOptions_Set calls, this object is passed to the <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options. ">natsConnection_Connect()</a> call, which will clone this object. After <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options. ">natsConnection_Connect()</a> returns, modifications to the options object will not affect the connection.</p>
<dl class="section note"><dt>Note</dt><dd>The object needs to be destroyed when no longer needed.*</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options. ">natsConnection_Connect()</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#ga93d8068cd6fff53b7f8e1c403db45eb9" title="Destroys a natsOptions object. ">natsOptions_Destroy()</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">newOpts</td><td>the location where store the pointer to the newly created <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga3f7e760214417c7d87541ecb9ab5bea5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetURL </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>url</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the URL of the <code>NATS Server</code> the client should try to connect to. The URL can contain optional user name and password.</p>
<p>Some valid URLS:</p>
<ul>
<li>nats://localhost:4222</li>
<li>nats://user@localhost:4222</li>
<li>nats://user:password@localhost:4222</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to. ">natsOptions_SetServers</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e" title="Sets the user name/password to use when not specified in the URL. ">natsOptions_SetUserInfo</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL. ">natsOptions_SetToken</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">url</td><td>the string representing the URL the connection should use to connect to the server. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gacb7e964ae54b74d972d72e118b7b8bdf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetServers </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>servers</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>serversCount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This specifies a list of servers to try to connect (or reconnect) to. Note that if you call <a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to. ">natsOptions_SetURL()</a> too, the actual list will contain the one from <a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to. ">natsOptions_SetURL()</a> and the ones specified in this call.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to. ">natsOptions_SetURL</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e" title="Sets the user name/password to use when not specified in the URL. ">natsOptions_SetUserInfo</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL. ">natsOptions_SetToken</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">servers</td><td>the array of strings representing the server URLs. </td></tr>
    <tr><td class="paramname">serversCount</td><td>the size of the array. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga5b99da7dd74aac3be962f323c3863d9e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetUserInfo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>user</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>password</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Credentials are usually provided through the URL in the form: <code>nats://foo:bar@localhost:4222</code>.<br />
 Until now, you could specify URLs in two ways, with <a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to. ">natsOptions_SetServers</a> or <a class="el" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4" title="Connects to a NATS Server using any of the URL from the given list. ">natsConnection_ConnectTo</a>. The client library would connect (or reconnect) only to this given list of URLs, so if any of the server in the list required authentication, you were responsible for providing the appropriate credentials in the URLs.<br />
 <br />
 However, with cluster auto-discovery, the client library asynchronously receives URLs of servers in the cluster. These URLs do not contain any embedded credentials. <br />
 You need to use this function (or <a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL. ">natsOptions_SetToken</a>) to instruct the client library to use those credentials when connecting to a server that requires authentication and for which there is no embedded credentials in the URL.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL. ">natsOptions_SetToken</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to. ">natsOptions_SetURL</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to. ">natsOptions_SetServers</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">user</td><td>the user name to send to the server during connect. </td></tr>
    <tr><td class="paramname">password</td><td>the password to send to the server during connect. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gad58a5b9dabadeebda30e952ff7b39193"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetToken </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>token</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Tokens are usually provided through the URL in the form: <code>nats://mytoken@localhost:4222</code>.<br />
 Until now, you could specify URLs in two ways, with <a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to. ">natsOptions_SetServers</a> or <a class="el" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4" title="Connects to a NATS Server using any of the URL from the given list. ">natsConnection_ConnectTo</a>. The client library would connect (or reconnect) only to this given list of URLs, so if any of the server in the list required authentication, you were responsible for providing the appropriate token in the URLs.<br />
 <br />
 However, with cluster auto-discovery, the client library asynchronously receives URLs of servers in the cluster. These URLs do not contain any embedded tokens. <br />
 You need to use this function (or <a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e" title="Sets the user name/password to use when not specified in the URL. ">natsOptions_SetUserInfo</a>) to instruct the client library to use this token when connecting to a server that requires authentication and for which there is no embedded token in the URL.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e" title="Sets the user name/password to use when not specified in the URL. ">natsOptions_SetUserInfo</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to. ">natsOptions_SetURL</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to. ">natsOptions_SetServers</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">token</td><td>the token to send to the server during connect. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga23a3b1f022112e98ddccb18b247b4426"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetTokenHandler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga7d93a74068ac6e5f4406d70b7c1f0094">natsTokenHandler</a>&#160;</td>
          <td class="paramname"><em>tokenCb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>closure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>For use cases where setting a static token through the URL<br />
 or through <a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL. ">natsOptions_SetToken</a> is not desirable.<br />
 <br />
 This function can be used to generate a token whenever the client needs one.<br />
 Some example of use cases: expiring token, credential rotation, ...</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL. ">natsOptions_SetToken</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">tokenCb</td><td>the tokenCb to use to generate a token to the server during connect. </td></tr>
    <tr><td class="paramname">closure</td><td>a pointer to an user defined object (can be <code>NULL</code>). See the <a class="el" href="group__callbacks_group.html#gad1a5ac566893e13dc8c81ac0e9c87afe" title="Callback used to deliver messages to the application. ">natsMsgHandler</a> prototype. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaabf8763b931dcf389c83fd95d760a413"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetNoRandomize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>noRandomize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If 'noRandomize' is true, then the list of server URLs is used in the order provided by <a class="el" href="group__opts_group.html#ga3f7e760214417c7d87541ecb9ab5bea5" title="Sets the URL to connect to. ">natsOptions_SetURL()</a> + <a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to. ">natsOptions_SetServers()</a>. Otherwise, the list is formed in a random order.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">noRandomize</td><td>if <code>true</code>, the list will be used as-is. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga17cd7fe41176cd98aca1184fa9352ad9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetTimeout </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This timeout, expressed in milliseconds, is used to interrupt a (re)connect attempt to a <code>NATS Server</code>. This timeout is used both for the low level TCP connect call, and for timing out the response from the server to the client's initial <code>PING</code> protocol.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">timeout</td><td>the time, in milliseconds, allowed for an individual connect (or reconnect) to complete. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga1c529d347be0fe2eec17c7f4698e283e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetName </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This name is sent as part of the <code>CONNECT</code> protocol. There is no default name.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">name</td><td>the name to set. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa1f09416d443fa7a6af6b695da563eba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetSecure </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>secure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Indicates to the server if the client wants a secure (SSL/TLS) connection.</p>
<p>The default is <code>false</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">secure</td><td><code>true</code> for a secure connection, <code>false</code> otherwise. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2cd6563694a439b3949a31fd81103099"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_LoadCATrustedCertificates </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>fileName</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Loads the trusted CA certificates from a file.</p>
<p>Note that the certificates are added to a SSL context for this <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object at the time of this call, so possible errors while loading the certificates will be reported now instead of when a connection is created. You can get extra information by calling <a class="el" href="group__library_group.html#ga2610d5691a89a0f2526989083bee0fd3" title="Returns the calling thread&#39;s last known error. ">nats_GetLastError</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">fileName</td><td>the file containing the CA certificates. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gafb30794fc2ae74b9e0bd8fb609b901c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetCATrustedCertificates </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>certificates</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Similar to <a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099" title="Loads the trusted CA certificates from a file. ">natsOptions_LoadCATrustedCertificates</a> expect that instead of loading from file, this loads from the given memory location.</p>
<p>If more than one certificate need to be provided, they need to be concatenated. For instance:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;const char *certs =</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;   &quot;-----BEGIN CERTIFICATE-----\n&quot;</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;   &quot;MIIGjzCCBHegAwIBAgIJAKT2W9SKY7o4MA0GCSqGSIb3DQEBCwUAMIGLMQswCQYD\n&quot;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;   (...)</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;   &quot;-----END CERTIFICATE-----\n&quot;</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;   &quot;-----BEGIN CERTIFICATE-----\n&quot;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;   &quot;MIIXyz...\n&quot;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;   (...)</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;   &quot;-----END CERTIFICATE-----\n&quot;</div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099" title="Loads the trusted CA certificates from a file. ">natsOptions_LoadCATrustedCertificates</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">certificates</td><td>the string containing the concatenated CA certificates. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga36943e2ba53d05407cdabc4e7e96484b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_LoadCertificatesChain </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>certsFileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>keyFileName</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The certificates must be in PEM format and must be sorted starting with the subject's certificate, followed by intermediate CA certificates if applicable, and ending at the highest level (root) CA.</p>
<p>The private key file format supported is also PEM.</p>
<p>See <a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099" title="Loads the trusted CA certificates from a file. ">natsOptions_LoadCATrustedCertificates</a> regarding error reports.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">certsFileName</td><td>the file containing the client certificates. </td></tr>
    <tr><td class="paramname">keyFileName</td><td>the file containing the client private key. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae98f0f9034e93941767ab1ae6eec2c0c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetCertificatesChain </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>cert</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>key</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Similar to <a class="el" href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b" title="Loads the certificate chain from a file, using the given key. ">natsOptions_LoadCertificatesChain</a> expect that instead of loading from file, this loads from the given memory locations.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga36943e2ba53d05407cdabc4e7e96484b" title="Loads the certificate chain from a file, using the given key. ">natsOptions_LoadCertificatesChain()</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">cert</td><td>the memory location containing the client certificates. </td></tr>
    <tr><td class="paramname">key</td><td>the memory location containing the client private key. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga5698f020e8eb3e7440eb073fe08ef62c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetCiphers </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>ciphers</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the list of available ciphers. Check <a href="https://www.openssl.org/docs/manmaster/apps/ciphers.html">https://www.openssl.org/docs/manmaster/apps/ciphers.html</a> for the proper syntax. Here is an example:</p>
<blockquote class="doxtable">
<p>"-ALL:HIGH" </p>
</blockquote>
<p>See <a class="el" href="group__opts_group.html#ga2cd6563694a439b3949a31fd81103099" title="Loads the trusted CA certificates from a file. ">natsOptions_LoadCATrustedCertificates</a> regarding error reports.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">ciphers</td><td>the ciphers suite. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga0ba43ba9930df385e4781b12be9f2851"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetExpectedHostname </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>hostname</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If set, the library will check that the hostname in the server certificate matches the given <code>hostname</code>. This will occur when a connection is created, not at the time of this call.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">hostname</td><td>the expected server certificate hostname. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga6f804ec44adc299989fe623570679da3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SkipServerVerification </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>skip</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>By default, the server certificate is verified. You can disable the verification by passing <code>true</code> to this function.</p>
<dl class="section warning"><dt>Warning</dt><dd>This is fine for tests but use with caution since this is not secure.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">skip</td><td>set it to <code>true</code> to disable - or skip - server certificate verification. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa16bfd09ef318af18c27a0e199681b69"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetVerbose </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>verbose</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the verbose mode. If <code>true</code>, sends are echoed by the server with an <code>OK</code> protocol message.</p>
<p>The default is <code>false</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">verbose</td><td><code>true</code> for a verbose protocol, <code>false</code> otherwise. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga26f166af20de98bec67bc6cc916f769e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetPedantic </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>pedantic</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the pedantic mode. If <code>true</code> some extra checks will be performed by the server.</p>
<p>The default is <code>false</code></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">pedantic</td><td><code>true</code> for a pedantic protocol, <code>false</code> otherwise. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae68fb615835364c0809555e8dc93f57e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetPingInterval </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>interval</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Interval, expressed in milliseconds, in which the client sends <code>PING</code> protocols to the <code>NATS Server</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">interval</td><td>the interval, in milliseconds, at which the connection will send <code>PING</code> protocols to the server. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaaff89c3f41627f4b2929dbc9b82d265b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetMaxPingsOut </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxPingsOut</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specifies the maximum number of <code>PING</code>s without corresponding <code>PONG</code>s (which should be received from the server) before closing the connection with the <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80aa76d5e3ce051bc7510be90e73663c93d">NATS_STALE_CONNECTION</a> status. If reconnection is allowed, the client library will try to reconnect.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">maxPingsOut</td><td>the maximum number of <code>PING</code>s without <code>PONG</code>s (positive number). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga1a3e3abfd7ddd8aff247df8f332bbda3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetIOBufSize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ioBufSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the size, in bytes, of the internal read/write buffers used for reading/writing data from a socket. If not specified, or the value is 0, the library will use a default value, currently set to 32KB.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">ioBufSize</td><td>the size, in bytes, of the internal buffer for read/write operations. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga3d1d3cb2f2a0e23d27dd60e96d1cc91b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetAllowReconnect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>allow</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specifies whether or not the client library should try to reconnect when losing the connection to the <code>NATS Server</code>.</p>
<p>The default is <code>true</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">allow</td><td><code>true</code> if the connection is allowed to reconnect, <code>false</code> otherwise. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gab54cd2719c0b64eebd6c7b83dd2908a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetMaxReconnect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxReconnect</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specifies the maximum number of reconnect attempts.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">maxReconnect</td><td>the maximum number of reconnects (positive number). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2730f4e16e318a2ef8de98dbf6ede807"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetReconnectWait </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>reconnectWait</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specifies how long to wait between two reconnect attempts from the same server. This means that if you have a list with S1,S2 and are currently connected to S1, and get disconnected, the library will immediately attempt to connect to S2. If this fails, it will go back to S1, and this time will wait for <code>reconnectWait</code> milliseconds since the last attempt to connect to S1.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">reconnectWait</td><td>the time, in milliseconds, to wait between attempts to reconnect to the same server. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa0d4b7ece8477cb9879f0dafff3456a5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetReconnectBufSize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>reconnectBufSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the size, in bytes, of the backing buffer holding published data while the library is reconnecting. Once this buffer has been exhausted, publish operations will return the <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a317fb9be1a80f6b1877f96a9a2db16ad" title="A buffer is not large enough to accommodate the data. ">NATS_INSUFFICIENT_BUFFER</a> error. If not specified, or the value is 0, the library will use a default value, currently set to 8MB.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">reconnectBufSize</td><td>the size, in bytes, of the backing buffer for write operations during a reconnect. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga95510436eee06f9992ded96a44795c40"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetMaxPendingMsgs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>maxPending</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specifies the maximum number of inbound messages that can be buffered in the library, for each subscription, before inbound messages are dropped and <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ae93ff5b7fe31f8570308385d92d317b0">NATS_SLOW_CONSUMER</a> status is reported to the <a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626" title="Callback used to notify the user of errors encountered while processing inbound messages. ">natsErrHandler</a> callback (if one has been set).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga127ec7a8196b453947a7fa9a64096cbd" title="Sets the error handler for asynchronous events. ">natsOptions_SetErrorHandler()</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">maxPending</td><td>the number of messages allowed to be buffered by the library before triggering a slow consumer scenario. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga127ec7a8196b453947a7fa9a64096cbd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetErrorHandler </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626">natsErrHandler</a>&#160;</td>
          <td class="paramname"><em>errHandler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>closure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specifies the callback to invoke when an asynchronous error occurs. This is used by applications having only asynchronous subscriptions that would not know otherwise that a problem with the connection occurred.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__callbacks_group.html#ga9e511dffa471dfb971b7dd2b12329626" title="Callback used to notify the user of errors encountered while processing inbound messages. ">natsErrHandler</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">errHandler</td><td>the error handler callback. </td></tr>
    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga44410242e73134e5bb51ef27904a9253"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetClosedCB </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>&#160;</td>
          <td class="paramname"><em>closedCb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>closure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specifies the callback to invoke when a connection is terminally closed, that is, after all reconnect attempts have failed (when reconnection is allowed).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">closedCb</td><td>the callback to be invoked when the connection is closed. </td></tr>
    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gadc8dc0cedd91bda71d544f3dedc4a039"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetDisconnectedCB </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>&#160;</td>
          <td class="paramname"><em>disconnectedCb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>closure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specifies the callback to invoke when a connection to the <code>NATS Server</code> is lost. There could be two instances of the callback when reconnection is allowed: one before attempting the reconnect attempts, and one when all reconnect attempts have failed and the connection is going to be permanently closed.</p>
<dl class="section warning"><dt>Warning</dt><dd>Invocation of this callback is asynchronous, which means that the state of the connection may have changed when this callback is invoked.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">disconnectedCb</td><td>the callback to be invoked when a connection to a server is lost </td></tr>
    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga26a48c8529fffa5f5d1a61c030979980"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetReconnectedCB </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>&#160;</td>
          <td class="paramname"><em>reconnectedCb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>closure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specifies the callback to invoke when the client library has successfully reconnected to a <code>NATS Server</code>.</p>
<dl class="section warning"><dt>Warning</dt><dd>Invocation of this callback is asynchronous, which means that the state of the connection may have changed when this callback is invoked.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">reconnectedCb</td><td>the callback to be invoked when the connection to a server has been re-established. </td></tr>
    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gab5baab507c974402ab0d8c5e8227ee65"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetDiscoveredServersCB </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>&#160;</td>
          <td class="paramname"><em>discoveredServersCb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>closure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Specifies the callback to invoke when the client library has been notified of one or more new <code>NATS Servers</code>.</p>
<dl class="section warning"><dt>Warning</dt><dd>Invocation of this callback is asynchronous, which means that the state may have changed when this callback is invoked.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">discoveredServersCb</td><td>the callback to be invoked when new servers have been discovered. </td></tr>
    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gab09491bad908dedcb323c780280733ff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetEventLoop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>loop</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga245eab0a01a485e40fba267f84ec037f">natsEvLoop_Attach</a>&#160;</td>
          <td class="paramname"><em>attachCb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gaea4c125ecfb43eaf43da20e8444c2aaa">natsEvLoop_ReadAddRemove</a>&#160;</td>
          <td class="paramname"><em>readCb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga2bb5dd2d821ca5bbc0488f7e6aceed17">natsEvLoop_WriteAddRemove</a>&#160;</td>
          <td class="paramname"><em>writeCb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gab63dee7f7012ba11ae20b76dbc36f2d0">natsEvLoop_Detach</a>&#160;</td>
          <td class="paramname"><em>detachCb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If you want to use an external event loop, the <code>NATS</code> library will not create a thread to read data from the socket, and will not directly write data to the socket. Instead, the library will invoke those callbacks for various events.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">loop</td><td>the <code>void*</code> pointer to the external event loop. </td></tr>
    <tr><td class="paramname">attachCb</td><td>the callback invoked after the connection is connected, or reconnected. </td></tr>
    <tr><td class="paramname">readCb</td><td>the callback invoked when the event library should start or stop polling for read events. </td></tr>
    <tr><td class="paramname">writeCb</td><td>the callback invoked when the event library should start or stop polling for write events. </td></tr>
    <tr><td class="paramname">detachCb</td><td>the callback invoked when a connection is closed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gabf060c92648b50c069f0abe7cbb06f1c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_UseGlobalMessageDelivery </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>global</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Normally, each asynchronous subscriber that is created has its own message delivery thread. The advantage is that it reduces lock contentions, therefore improving performance.<br />
 However, if an application creates many subscribers, this is not scaling well since the process would use too many threads.</p>
<p>When a connection is created from a <code>nats_Options</code> that has enabled global message delivery, asynchronous subscribers from this connection will use a shared thread pool responsible for message delivery.</p>
<dl class="section note"><dt>Note</dt><dd>The message order per subscription is still guaranteed.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__library_group.html#gab21e94ce7a7d226611ea2c05914cf19d" title="Sets the maximum size of the global message delivery thread pool. ">nats_SetMessageDeliveryPoolSize()</a> </dd>
<dd>
<a class="el" href="group__env_variables_group.html">Environment Variables</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">global</td><td>if <code>true</code>, uses the global message delivery thread pool, otherwise, each asynchronous subscriber will create their own message delivery thread. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga7ca713c7532eff4d41a492e95b8822cf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_IPResolutionOrder </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>order</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The library would previously favor IPv6 addresses during the connect process. <br />
 You can now change the order, or even exclude a family of addresses, using this option. Here is the list of possible values: <br />
 </p><table class="doxtable">
<tr>
<th>Value </th><th>Meaning  </th></tr>
<tr>
<td>46 </td><td>try IPv4 first, if it fails try IPv6 </td></tr>
<tr>
<td>64 </td><td>try IPv6 first, if it fails try IPv4 </td></tr>
<tr>
<td>4 </td><td>use only IPv4 </td></tr>
<tr>
<td>6 </td><td>use only IPv6 </td></tr>
<tr>
<td>0 </td><td>any family, no specific order </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>If this option is not set, or you specify <code>0</code> for the order, the library will use the first IP (based on the DNS configuration) for which a successful connection can be made.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">order</td><td>a string representing the order for the IP resolution. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga8f06568cc3319a5a0eef9f80282034ca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetSendAsap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>sendAsap</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>For throughput performance, the client library tries by default to buffer as much data as possible before sending it over TCP.</p>
<p>Setting this option to <code>true</code> will make Publish calls send the data right away, reducing latency, but also throughput.</p>
<p>A good use-case would be a connection used to solely send replies. Imagine, a requestor sending a request, waiting for the reply before sending the next request.<br />
 The replier application will send only one reply at a time (since it will not receive the next request until the requestor receives the reply).<br />
 In such case, it makes sense for the reply to be sent right away.</p>
<p>The alternative would be to call <a class="el" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f" title="Flushes the connection. ">natsConnection_Flush()</a>, but this call requires a round-trip with the server, which is less efficient than using this option.</p>
<p>Note that the Request() call already automatically sends the request as fast as possible, there is no need to set an option for that.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">sendAsap</td><td>a boolean indicating if published data should be sent right away or be buffered. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga70aa85319933d78c0076cc862fa3e5a6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_UseOldRequestStyle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>useOldStyle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Setting <code>useOldStyle</code> to <code>true</code> forces the request calls to use the original behavior, which is to create a new inbox, a new subscription on that inbox and set auto-unsubscribe to 1.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">useOldStyle</td><td>a boolean indicating if old request style should be used. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga4f694b87039cedaa65cd25656b14d1a3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetNoEcho </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>noEcho</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This configures whether the server will echo back messages that are sent on this connection if there is also matching subscriptions.</p>
<p>Set this to <code>true</code> to prevent the server from sending back messages produced by this connection. The default is false, that is, messages originating from this connection will be sent by the server if the connection has matching subscriptions.</p>
<dl class="section note"><dt>Note</dt><dd>This is supported on servers &gt;= version 1.2.0. Calling <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options. ">natsConnection_Connect()</a> with the option set to <code>true</code> to server below this version will return the <code>NATS_NO_SERVER_SUPPORT</code> error.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">noEcho</td><td>a boolean indicating if sent messages can be delivered back to this connection or not. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga20946800d024b7089e73d63454d1c19f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetRetryOnFailedConnect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>retry</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gacdef6aff3e47953f19e35857ab8e274c">natsConnectionHandler</a>&#160;</td>
          <td class="paramname"><em>connectedCb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>closure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>By default, <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options. ">natsConnection_Connect()</a> attempts to connect to a server specified in provided list of servers. If it cannot connect and the list has been fully tried, the function returns an error.</p>
<p>This option is used to changed this default behavior.</p>
<p>If <code>retry</code> is set to <code>true</code> and connection cannot be established right away, the library will attempt to connect based on the reconnect attempts and delay settings.</p>
<dl class="section note"><dt>Note</dt><dd>The connect retry logic uses reconnect settings even if <a class="el" href="group__opts_group.html#ga3d1d3cb2f2a0e23d27dd60e96d1cc91b" title="Indicates if the connection will be allowed to reconnect. ">natsOptions_SetAllowReconnect()</a> has been set to false. In other words, a failed connect may be retried even though a reconnect will not be allowed should the connection to the server be lost after initial connect.</dd></dl>
<p>The behavior will then depend on the value of the <code>connectedCb</code> parameter:</p>
<ul>
<li>If <code>NULL</code>, then the call blocks until it can connect or exhausts the reconnect attempts.</li>
<li>If not <code>NULL</code>, and no connection can be immediately established, the <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options. ">natsConnection_Connect()</a> calls returns <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a49a1ea653ce112b3c53eedebcd60811d">NATS_NOT_YET_CONNECTED</a> to indicate that no connection is currently established, but will try asynchronously to connect using the reconnect attempts/delay settings. If the connection is later established, the specified callback will be invoked. If no connection can be made and the retry attempts are exhausted, the callback registered with <a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253" title="Sets the callback to be invoked when a connection to a server is permanently lost. ">natsOptions_SetClosedCB()</a>, if any, will be invoked.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>If <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options. ">natsConnection_Connect()</a> returns <code>NATS_OK</code> (that is, a connection to a <code>NATS Server</code> was established in that call), then the <code>connectedCb</code> callback will not be invoked.</dd></dl>
<p>If <code>retry</code> is set to false, <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options. ">natsConnection_Connect()</a> behaves as originally designed, that is, returns an error and no connection object if failing to connect to any server in the list.</p>
<dl class="section note"><dt>Note</dt><dd>The <code>connectedCb</code> parameter is ignored and set to <code>NULL</code> in the options object when <code>retry</code> is set to <code>false</code>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#gab54cd2719c0b64eebd6c7b83dd2908a0" title="Sets the maximum number of reconnect attempts. ">natsOptions_SetMaxReconnect()</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#ga2730f4e16e318a2ef8de98dbf6ede807" title="Sets the time between reconnect attempts. ">natsOptions_SetReconnectWait()</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253" title="Sets the callback to be invoked when a connection to a server is permanently lost. ">natsOptions_SetClosedCB()</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">retry</td><td>a boolean indicating if a failed connect should be retried. </td></tr>
    <tr><td class="paramname">connectedCb</td><td>if <code>retry</code> is true and this is not <code>NULL</code>, then the connect may be asynchronous and this callback will be invoked if the connect succeeds. </td></tr>
    <tr><td class="paramname">closure</td><td>a pointer to an user object that will be passed to the callback. <code>closure</code> can be <code>NULL</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga60117450fc1f7b6f81bab455aeed7515"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetUserCredentialsCallbacks </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b">natsUserJWTHandler</a>&#160;</td>
          <td class="paramname"><em>ujwtCB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>ujwtClosure</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a>&#160;</td>
          <td class="paramname"><em>sigCB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>sigClosure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Any time the library creates a TCP connection to the server, the server in response sends an <code>INFO</code> protocol. That <code>INFO</code> protocol, for NATS Server at v2.0.0+, may include a <code>nonce</code> for the client to sign.</p>
<p>If this option is set, the library will invoke the two handlers to fetch the user JWT and sign the server's nonce.</p>
<p>This is an option that will be used only by users that are able to sign using Ed25519 (public-key signature system). Most users will probably prefer the user of <a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and see required to sign nonce. ">natsOptions_SetUserCredentialsFromFiles()</a>.</p>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515" title="Sets the callbacks to fetch user JWT and sign server&#39;s nonce. ">natsOptions_SetUserCredentialsCallbacks()</a> and <a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback. ">natsOptions_SetNKey()</a> are mutually exclusive. Calling this function will remove the NKey and replace the signature handler, that was set with <a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback. ">natsOptions_SetNKey()</a>, with this one.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__callbacks_group.html#ga258b30458134be90f17315c037f34b7b" title="Callback used to fetch and return account signed user JWT. ">natsUserJWTHandler</a> </dd>
<dd>
<a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b" title="Callback used to sign a nonce sent by the server. ">natsSignatureHandler</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and see required to sign nonce. ">natsOptions_SetUserCredentialsFromFiles()</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">ujwtCB</td><td>the callback to invoke to fetch the user JWT. </td></tr>
    <tr><td class="paramname">ujwtClosure</td><td>the closure that will be passed to the <code>ujwtCB</code> callback. </td></tr>
    <tr><td class="paramname">sigCB</td><td>the callback to invoke to sign the server nonce. </td></tr>
    <tr><td class="paramname">sigClosure</td><td>the closure that will be passed to the <code>sigCB</code> callback. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga59b47f7b7a19085cf8eaada9bfe5606e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetUserCredentialsFromFiles </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>userOrChainedFile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>seedFile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is a convenient option that specifies the files(s) to use to fetch the user JWT and the user seed to be used to sign the server's nonce.</p>
<p>The <code>userOrChainedFile</code> contains the user JWT token and possibly the user NKey seed. Note the format of this file:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;-----BEGIN NATS USER JWT-----</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;...an user JWT token...</div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;------END NATS USER JWT------</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;************************* IMPORTANT *************************</div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;NKEY Seed printed below can be used to sign and prove identity.</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;NKEYs are sensitive and should be treated as secrets.</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;-----BEGIN USER NKEY SEED-----</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;SU...</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;------END USER NKEY SEED------</div></div><!-- fragment --><p>The <code>---BEGIN NATS USER JWT---</code> header is used to detect where the user JWT is in this file.</p>
<p>If the file does not contain the user NKey seed, then the <code>seedFile</code> file name must be specified and must contain the user NKey seed.</p>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and see required to sign nonce. ">natsOptions_SetUserCredentialsFromFiles()</a> and <a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback. ">natsOptions_SetNKey()</a> are mutually exclusive. Calling this function will remove the NKey and replace the signature handler, that was set with <a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback. ">natsOptions_SetNKey()</a>, with an internal one that will handle the signature.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">userOrChainedFile</td><td>the name of the file containing the user JWT and possibly the user NKey seed. </td></tr>
    <tr><td class="paramname">seedFile</td><td>the name of the file containing the user NKey seed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga0290eac4665569c850468d9f00e246a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetNKey </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>pubKey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b">natsSignatureHandler</a>&#160;</td>
          <td class="paramname"><em>sigCB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>sigClosure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Any time the library creates a TCP connection to the server, the server in response sends an <code>INFO</code> protocol. That <code>INFO</code> protocol, for NATS Server at v2.0.0+, may include a <code>nonce</code> for the client to sign.</p>
<p>If this option is set, the library will add the NKey publick key <code>pubKey</code> to the <code>CONNECT</code> protocol along with the server's nonce signature resulting from the invocation of the signature handler <code>sigCB</code>.</p>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="group__opts_group.html#ga0290eac4665569c850468d9f00e246a0" title="Sets the NKey public key and signature callback. ">natsOptions_SetNKey()</a> and <a class="el" href="group__opts_group.html#ga60117450fc1f7b6f81bab455aeed7515" title="Sets the callbacks to fetch user JWT and sign server&#39;s nonce. ">natsOptions_SetUserCredentialsCallbacks()</a> or <a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and see required to sign nonce. ">natsOptions_SetUserCredentialsFromFiles()</a> are mutually exclusive. Calling this function will remove the user JWT callback and replace the signature handler, that was set with one of the user credentials options, with this one.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__callbacks_group.html#gab786ffd670c86de0563559351305080b" title="Callback used to sign a nonce sent by the server. ">natsSignatureHandler</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">pubKey</td><td>the user NKey public key. </td></tr>
    <tr><td class="paramname">sigCB</td><td>the callback to invoke to sign the server nonce. </td></tr>
    <tr><td class="paramname">sigClosure</td><td>the closure that will be passed to the <code>sigCB</code> callback. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaafda5fb8d9ee3a17bd475ceaecfac218"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsOptions_SetWriteDeadline </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>deadline</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>If this is set, the socket is set to non-blocking mode and write will have a deadline set. If the deadline is reached, the write call will return an error which will translate to publish calls, or any library call trying to send data to the server, to possibly fail.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. </td></tr>
    <tr><td class="paramname">deadline</td><td>the write deadline expressed in milliseconds. If set to 0, it means that there is no deadline and socket is in blocking mode. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga93d8068cd6fff53b7f8e1c403db45eb9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsOptions_Destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>opts</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroys the natsOptions object, freeing used memory. See the note in the <a class="el" href="group__opts_group.html#ga61d4a0cf2fbf7d13cc910e5a00c575be" title="Creates a natsOptions object. ">natsOptions_Create()</a> call.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">opts</td><td>the pointer to the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object to destroy. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
    <a href="http://www.nats.io">
    </a></li>
  </ul>
</div>
</body>
</html>
